home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Devices / ConUnit.i < prev    next >
Encoding:
Text File  |  1994-04-15  |  2.9 KB  |  91 lines

  1. {
  2.         ConUnit.i for PCQ Pascal
  3.  
  4.         Console device unit definitions
  5. }
  6.  
  7. {$I "Include:Exec/Ports.i"}
  8. {$I "Include:Devices/Console.i"}
  9. {$I "Include:Devices/Keymap.i"}
  10. {$I "Include:Devices/InputEvent.i"}
  11.  
  12.  
  13. const
  14. { ---- console unit numbers for OpenDevice() }
  15.  CONU_LIBRARY   = -1;      { no unit, just fill in IO_DEVICE field }
  16.  CONU_STANDARD  = 0;       { standard unmapped console }
  17.  
  18. { ---- New unit numbers for OpenDevice() - (V36) }
  19.  
  20.  CONU_CHARMAP   = 1;       { bind character map to console }
  21.  CONU_SNIPMAP   = 3;       { bind character map w/ snip to console }
  22.  
  23. { ---- New flag defines for OpenDevice() - (V37) }
  24.  
  25.  CONFLAG_DEFAULT               =  0;
  26.  CONFLAG_NODRAW_ON_NEWSIZE     =  1;
  27.  
  28.  
  29.     PMB_ASM     = M_LNM + 1;    { internal storage bit for AS flag }
  30.     PMB_AWM     = PMB_ASM + 1;  { internal storage bit for AW flag }
  31.     MAXTABS     = 80;
  32.  
  33.  
  34. type
  35.  
  36.     ConUnit = record
  37.         cu_MP   : MsgPort;
  38.         { ---- read only variables }
  39.         cu_Window       : Address;      { (WindowPtr) intuition window bound to this unit }
  40.         cu_XCP          : Short;        { character position }
  41.         cu_YCP          : Short;
  42.         cu_XMax         : Short;        { max character position }
  43.         cu_YMax         : Short;
  44.         cu_XRSize       : Short;        { character raster size }
  45.         cu_YRSize       : Short;
  46.         cu_XROrigin     : Short;        { raster origin }
  47.         cu_YROrigin     : Short;
  48.         cu_XRExtant     : Short;        { raster maxima }
  49.         cu_YRExtant     : Short;
  50.         cu_XMinShrink   : Short;        { smallest area intact from resize process }
  51.         cu_YMinShrink   : Short;
  52.         cu_XCCP         : Short;        { cursor position }
  53.         cu_YCCP         : Short;
  54.  
  55.    { ---- read/write variables (writes must must be protected) }
  56.    { ---- storage for AskKeyMap and SetKeyMap }
  57.  
  58.         cu_KeyMapStruct : KeyMap;
  59.  
  60.    { ---- tab stops }
  61.  
  62.         cu_TabStops     : Array [0..MAXTABS-1] of Short;
  63.                                 { 0 at start, -1 at end of list }
  64.  
  65.    { ---- console rastport attributes }
  66.  
  67.         cu_Mask         : Byte;
  68.         cu_FgPen        : Byte;
  69.         cu_BgPen        : Byte;
  70.         cu_AOLPen       : Byte;
  71.         cu_DrawMode     : Byte;
  72.         cu_AreaPtSz     : Byte;
  73.         cu_AreaPtrn     : Address;      { cursor area pattern }
  74.         cu_Minterms     : Array [0..7] of Byte; { console minterms }
  75.         cu_Font         : Address;      { (TextFontPtr) }
  76.         cu_AlgoStyle    : Byte;
  77.         cu_TxFlags      : Byte;
  78.         cu_TxHeight     : Short;
  79.         cu_TxWidth      : Short;
  80.         cu_TxBaseline   : Short;
  81.         cu_TxSpacing    : Short;
  82.  
  83.    { ---- console MODES and RAW EVENTS switches }
  84.  
  85.         cu_Modes        : Array [0..(PMB_AWM+7) div 8 - 1] of Byte;
  86.                                 { one bit per mode }
  87.         cu_RawEvents    : Array [0..(IECLASS_MAX+7) div 8 - 1] of Byte;
  88.     end;
  89.     ConUnitPtr = ^ConUnit;
  90.  
  91.